

class Test(unittest.TestCase):
    def setUp(self):
        desired_caps = {}
        desired_caps['platformName'] = 'Android'
        desired_caps['platformVersion'] = '5.1'
        desired_caps['deviceName'] = 'LC5BTB801564'
        desired_caps['appPackage'] = 'com.tyuan.tangy'
        desired_caps['appActivity'] = '.ui.IndexActivity'
        self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
        print "open app!"


class AppUI(unittest.TestCase):
    def setUp(self):
        # -----------------------------包名相关信息-----------------
        desired_caps = {'platformName': 'Android',
                             'deviceName': '127.0.0.1:7555',
                             'platformVersion': '8.0',
                             'appPackage': 'com.tuya.uat',
                             'appActivity': 'com.ssf.tckotlin.ui.activity.welcome.WelcomeActivity'
                             }
        self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', self.desired_caps)
        self.driver.implicitly_wait(5)
        print('start App')